import type { AnyObject } from "@/typing";
import type { PaginationProps } from "ant-design-vue";

/**分页状态 */
export interface State<T = any[]> {
  /**加载 */
  loading: boolean;
  /**数据 */
  dataSource: T[];
  /**分页 */
  pagination: PaginationProps;
}

/**分页配置 */
export interface Options<T = any[]> {
  /**查询参数 */
  params?: AnyObject;
  /**自动查询 */
  autoFetch?: boolean;
  /**简单分页 */
  simple?: boolean;
  /**偏移量 */
  pageSize?: number;
  /**覆盖数据 */
  coverData?: (rows: T) => T[];
}
